package cn.cxj.pay.service.impl;

import cn.cxj.basic.util.AliPayUtils;
import cn.cxj.pay.domain.AlipayInfo;
import cn.cxj.pay.domain.PayBill;
import cn.cxj.pay.service.IPayService;
import org.springframework.stereotype.Service;

@Service
public class PayServiceImpl implements IPayService {
    @Override
    public String pay(AlipayInfo alipayInfo, PayBill payBill) {
        // 0 支付宝 1 微信 2 银联
        Integer payChannel = payBill.getPayChannel();
        String result = "";
        switch (payChannel){
            case 0:
                // 支付宝支付,调用支付宝的接口
                result = AliPayUtils.aliPay(alipayInfo, payBill);
                break;
            case 1: 
                
                break;
            case 2:
                
                break;
            default:
        }
        return result;
    }
}
